package com.example.ormsqlsplicingframe1.orm.registry;

import com.example.ormsqlsplicingframe1.utlis.DateUtils;
import lombok.SneakyThrows;

import java.lang.reflect.Field;
import java.text.SimpleDateFormat;
import java.util.Date;

public class RegistryDate implements Registry<Date,String> {

    private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    @SneakyThrows
    @Override
    public Date decode(String value, Field field) {



        String date = "1692866560000";


        return DateUtils.parse(value);

    }

    @Override
    public Class<Date> getObj() {
        return Date.class;
    }
}
